#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
//#include "list_test.h"
#include "list.h"
using namespace std;
using namespace zh;

void Print_list(const list<Date>& l1)
{
	zh::list<zh::Date>::const_iterator it = l1.begin();
	while (it != l1.end())
	{
		cout << it->_year << "-" << it->_month << "-" << it->_day << endl;
		++it;
	}
}

int main()
{
	zh::list<zh::Date> l1;
	l1.push_back(zh::Date(4,4,4));
	l1.push_back(zh::Date(5,5,5));
	l1.push_back(zh::Date(6,6,6));

	l1.push_front(zh::Date(3, 3, 3));
	l1.push_front(zh::Date(2, 2, 2));
	l1.push_front(zh::Date(1, 1, 1));

	//for (auto& e : l1)
	//{
	//	cout << e._year << "/" << e._month << "/" << e._day << endl;
	//}
	zh::list<zh::Date>::iterator it = l1.cbegin();
	while (it != l1.cend())
	{
		cout << it->_year << "/" << it->_month << "/" << it->_day << endl;
		--it;
	}
	return 0;
}